package com.newer.dao.mapper.sys;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.newer.dao.bean.sys.MenuPermission;
import com.newer.dao.bean.sys.Permission;
import com.newer.dao.commons.dataobject.MenuPermissionDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MenuPermissionMapper extends BaseMapper<MenuPermission> {

    int deleteByPrimaryKey(String id);

    @Override
    Integer insert(MenuPermission record);

    int insertSelective(MenuPermission record);

    MenuPermission selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(MenuPermission record);

    int updateByPrimaryKey(MenuPermission record);

    List<MenuPermission> selectByMenuId(String menuId);

    int updateByPrimaryPermissionId(MenuPermission record);

    List<Permission> selectMenuDefaultPermissionByParams(MenuPermissionDO record);

    List<Permission> selectRoleMenuPermissions(@Param("roleId") String roleId, @Param("permissionStatus") Integer status, @Param("menuIds") List<String> menuIds);
}